#ifndef __ShootEmUp_h_
#define __ShootEmUp_h_

#include "BaseApplication.h"
#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
#include "../res/resource.h"
#endif

#include <OgreNoMemoryMacros.h>
#include <CEGUI/CEGUIImageset.h>
#include <CEGUI/CEGUISystem.h>
#include <CEGUI/CEGUILogger.h>
#include <CEGUI/CEGUISchemeManager.h>
#include <CEGUI/CEGUIWindowManager.h>
#include <CEGUI/CEGUIWindow.h>
#include "OgreCEGUIRenderer.h"
#include "OgreCEGUIResourceProvider.h"
#include <CEGUI/CEGUIPropertyHelper.h>

#include <CEGUI/elements/CEGUIPushButton.h>

class MainCharacter;
class Enemy;
class LevelManager;
#include <vector>

class ShootEmUp : public  BaseApplication
{
	// Attributes ------------------------------------------------------------------------------
public:
	// World dimensions
	static const Ogre::Vector3 WORLD_MIN;
	static const Ogre::Vector3 WORLD_MAX;
	static const Ogre::AxisAlignedBox WORLD_AABOX;

protected:
	LevelManager* levelmanager;

	CEGUI::OgreCEGUIRenderer* mGUIRenderer;
	CEGUI::System* mGUISystem;
	CEGUI::Window* mEditorGuiSheet;


	// Methods ---------------------------------------------------------------------------------
public:
	virtual ~ShootEmUp(void);
	ShootEmUp(void);

	void menuCegui(void);
	void menuFin(void);
	void setupEventFin(void);
	void menuPause(void);
	void setupEventPause(void);
	void menuDepart(void);
	void setupEventDepart(void);
	bool handleCredit(const CEGUI::EventArgs& e);
	void setupEventCredit(void);
	bool handleCreditPrevious(const CEGUI::EventArgs& e);
	bool handleHelp(const CEGUI::EventArgs& e);
	void setupEventHelp(void);
	bool handlePlay(const CEGUI::EventArgs& e);
	void setupEventPlay(void);
	bool handleCredit1Previous(const CEGUI::EventArgs& e);
	bool handleCredit2Previous(const CEGUI::EventArgs& e);
	void menuFinGagner(void);
	void setupEventFinGagner(void);

	void showFish(bool b);
	static std::string DumpNodes(Ogre::Node *n);
	void toggleView();
	
protected:
	virtual void chooseSceneManager(void);
	virtual void createScene(void);
	virtual bool frameStarted(const Ogre::FrameEvent& evt);
	virtual void createFrameListener(void);
	static void DumpNodes(std::stringstream &ss, Ogre::Node *n, int level);
	bool handleQuit(const CEGUI::EventArgs& e);
	void setupEventHandlers(void);
	

};

#endif // #ifndef __ShootEmUp_h_